﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ArgusControls
{
	public static class ControlTheme
	{
		public static Uri ThemeBlack { get { return new Uri("/ArgusControls;component/Themes/Black.xaml", UriKind.Relative); } }

		static ResourceDictionary resourceDictionary = null;

		public static Uri Source
		{
			get
			{
				if (resourceDictionary == null)
					return null;
				return resourceDictionary.Source;
			}
			set
			{
				resourceDictionary = new ResourceDictionary();
				resourceDictionary.Source = value;
			}
		}

		public static Style GetValue(object Key)
		{
			if (resourceDictionary == null)
			{
				//resourceDictionary = new ResourceDictionary();
				//Uri uri = new Uri("/ArgusControls;component/Templates.xaml ", UriKind.Relative);
				//resourceDictionary.Source = uri;
				return null;
			}
			return (Style)resourceDictionary[Key];
		}

		public static Style Button { get { return ControlTheme.GetValue("Button"); } }
		public static Style TabItem { get { return ControlTheme.GetValue("TabItem"); } }
	}
}
